import request from '@/utils/request'

// 获取配送任务列表
export const getDeliveryTasks = () => {
  return request({
    url: '/api/deliveries/',
    method: 'get'
  })
}

// 创建配送任务
export const createDeliveryTask = (taskData) => {
  return request({
    url: '/api/deliveries/',
    method: 'post',
    data: taskData
  })
}

// 更新配送任务状态
export const updateDeliveryTaskStatus = (taskId, statusData) => {
  return request({
    url: `/api/deliveries/${taskId}/status/`,
    method: 'post',
    data: statusData
  })
}

// 获取配送任务详情
export const getDeliveryTaskDetail = (taskId) => {
  return request({
    url: `/api/deliveries/${taskId}/`,
    method: 'get'
  })
} 